package com.genexususa.eo.google.test.biddingstrategy;

import com.genexususa.eo.google.connection.BiddingStrategyManager;
import com.genexususa.eo.google.test.Constants;

public class ConsumeCreateBiddingStrategy {

    public static void main(String[] args){

        String xmlTargetSpend = "<GA_BiddingStrategyCollection xmlns=\"L2TMediaDev_L2T1.51\">\n" +
                "\t<BiddingStrategies>\n" +
                "\t\t<BiddingStrategy>\n" +
                "\t\t\t<Name>Bidding Strategy Target Spend #1</Name>\n" +
                "\t\t\t<BiddingGxId>73</BiddingGxId>\n" +
                "\t\t\t<BiddingScheme>\n" +
                "\t\t\t\t<BSTargetSpend>\n" +
                "\t\t\t\t\t<BidCeiling>15000000</BidCeiling>\n" +
                "\t\t\t\t\t<SpendTarget>200000000</SpendTarget>\n" +
                "\t\t\t\t</BSTargetSpend>\n" +
                "\t\t\t</BiddingScheme>\n" +
                "\t\t</BiddingStrategy>\n" +
                "\t</BiddingStrategies>\n" +
                "</GA_BiddingStrategyCollection>";

        String xmlEnhanced = "<GA_BiddingStrategyCollection xmlns=\"L2TMediaDev_L2T1.51\">\n" +
                "\t<BiddingStrategies>\n" +
                "\t\t<BiddingStrategy>\n" +
                "\t\t\t<Name>Bidding Strategy Enhanced #1</Name>\n" +
                "\t\t\t<BiddingGxId>73</BiddingGxId>\n" +
                "\t\t\t<BiddingScheme>\n" +
                "\t\t\t\t<BSEnhancedCPC>\n" +
                "\t\t\t\t</BSEnhancedCPC>\n" +
                "\t\t\t</BiddingScheme>\n" +
                "\t\t</BiddingStrategy>\n" +
                "\t</BiddingStrategies>\n" +
                "</GA_BiddingStrategyCollection>";

        BiddingStrategyManager bsm = new BiddingStrategyManager();
        bsm.SetClientId(Constants.testAccountEmiliano);

        String res = bsm.CreateBiddingStrategy(xmlEnhanced);
        bsm.Finalize();

        System.out.println(res);



    }
}
